package top.lilele.adminSystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * 项目实体类
 *
 * @author lilele
 */
@Data
@TableName(value = "admin_project")
public class AdminProjectEntity implements Serializable {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 名称
     */
    @NotEmpty(message = "名称不能为空")
    @Length(max = 100, message = "名称限制100个字符")
    @TableField(value = "name")
    private String name;

    /**
     * 编号
     */
    @NotEmpty(message = "编号不能为空")
    @Length(max = 100, message = "编号限制100个字符")
    @TableField(value = "number")
    private String number;

    /**
     * 概述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 父元素id
     */
    @TableField(value = "parentId")
    private String parentId;

    /**
     * 状态 1、已创建  2、立项完成  3、进行中  4、成功完结 5、异常完结
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 项目类型
     */
    @NotEmpty(message = "类型不能为空")
    @TableField(value = "mapId")
    private String mapId;

    /**
     * 开始时间
     */
    @TableField(value = "beginTime")
    private Date beginTime;

    /**
     * 结束时间
     */
    @TableField(value = "overTime")
    private Date overTime;

    /**
     * 创建人id
     */
    @TableField(value = "createdId")
    private String createdId;

    /**
     * 更新人id
     */
    @TableField(value = "updatedId")
    private String updatedId;

    @TableField(value = "createdTime", fill = FieldFill.INSERT)
    private Date createdTime;
    @TableField(value = "updatedTime", fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;
}
